import { request } from '@/utils/request'

// GET 列出可领取优惠券列表：/v1/coupon/gifts
export function getNewCoupons() {
  return request({
    url: '/v1/coupon/gifts',
    method: 'GET',
  })
}

// POST 领取优惠券 待定
export function takeCoupons(coupon_ids: string[]) {
  return request({
    url: '/v1/coupon/gift/take',
    method: 'POST',
    data: {
      coupon_ids,
    },
  })
}

// GET 列出我的优惠券 /v1/coupon/list
export function getMyCoupons(data) {
  return request({
    url: '/v1/coupon/list',
    method: 'GET',
    data
  })
}
